import request from '@/config/axios'

export interface ProjectBaseDataVO {
  id?: string;
	projectNo: string;
	tmsProjectNo: string;
	projectName: string;
	status: string;
	startTime: string;
	endTime: string;
	clinicalExperimentalPlanNo: string;
	signCompanyName: string;
	customerShortName: string;
	customerNo: string;
	sponsor: string;
	businessType: string;
	projectLevel: string;
	contractNo: string;
	outerContractNo: string;
	bd: string;
	pm: string;
	irtAbutment: string;
}


// 查询项目基础数据分页
export const getProjectBaseDataPage = async (params) => {
  return await request.get({url: `/project/baseData/page`, params})
}

// 查询项目基础数据详情
export const getProjectBaseData = async (id: number) => {
  return await request.get({url: `/project/baseData/get?id=` + id})
}

// 新增项目基础数据
export const createProjectBaseData = async (data: ProjectBaseDataVO) => {
  return await request.post({url: `/project/baseData/create`, data})
}

// 修改项目基础数据
export const updateProjectBaseData = async (data: ProjectBaseDataVO) => {
  return await request.put({url: `/project/baseData/update`, data})
}

// 删除项目基础数据
export const deleteProjectBaseData = async (id: number) => {
  return await request.delete({url: `/project/baseData/delete?id=` + id})
}

// 导出项目基础数据
export const exportProjectBaseData = async (params) => {
  return await request.download({url: `/project/baseData/export`, params})
}

// 导入项目基础数据
export const importProjectBaseData = async (params) => {
  return await request.download({url: `/project/baseData/import`, params})
}

// 查询项目基础数据模版
export const importBaseDataTemplate = () => {
  return request.download({url: `/project/baseData/get-import-template`})
}
